package org.example.backend.mapper;
import org.apache.ibatis.annotations.Param;

import org.example.backend.entity.Wallpapers;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author wangy
* @description 针对表【wallpapers(壁纸主表)】的数据库操作Mapper
* @createDate 2025-04-06 20:05:45
* @Entity org.example.backend.entity.Wallpapers
*/
public interface WallpapersMapper extends BaseMapper<Wallpapers> {
    List<Wallpapers> findWallpapers(
            String category,
            String tag,
            Integer width,
            Integer height,
            String aspectRatio,
            Boolean isPremium,
            String keyword,
            String sort,
            int offset,
            int size
    );

    int countWallpapers(
            String category,
            String tag,
            Integer width,
            Integer height,
            String aspectRatio,
            Boolean isPremium,
            String keyword
    );

    Wallpapers findAllById(@Param("id") Long id);

    void updateDownloadCount(@Param("id")Long id);
}




